import Cookies from 'js-cookie'

const TokenKey = 'hrsaas-ihrm-token'// 方便维护 只需要写一份 写错了自动会报错
const timeKey = 'hrsaas-timestamp-key'
export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}
export function getTimeStamp() {
  return Cookies.get(timeKey)
}

export function setTimeStamp(time) {
  return Cookies.set(timeKey, time)
}

export function getUserInfo() {
  return Cookies.get('userinfo')
}

export function setUserInfo(obj) {
  return Cookies.set('userinfo', obj)
}

export function removeUserInfo() {
  return Cookies.remove('userinfo')
}
